<h2>品牌管理</h2>
<?php
$this->menu = array(
	array('label'=>'添加品牌', 'url'=>array('edit'), 'visible'=>Yii::app()->user->v('manage@BrandEdit')),
);

$table = new YDataGrid($list, array(
	'columns' => array(
		'main_picture',
		'name',
		'cate',
		'brand_flags',
		'rank'
	),
	'key' => '_id'
));

$table
->setTitles(array('品牌Logo', '品牌名称', '品牌分类', '标识', '排序值'))
->setColumnValues(array(
	'A' => 'php:empty($data)?"":CHtml::image(CommonHelper::get_thumb($data, "50x25"))',
	'C' => 'php:GoodsCateModel::getCateFamilys($data, " > ", "<br>", "", "brand")',
	'D' => new YDataGridFlagsCell('brand_flags'),
))
->insertCol(0, array(
	YHtmlDataGrid::link('编辑', '/manage/Brand/Edit/{$key}', array('visible'=>Yii::app()->user->v('manage@BrandEdit'))),
	YHtmlDataGrid::jsLink('删除', 'del', array('visible'=>Yii::app()->user->v('manage@BrandDel')))
), '操作')
->addColClass(array(
	'B' => 'alt',
	'E' => 'right',
	'F' => 'title'
))
->render(false);
